﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 生产任务。
/// </summary>
[SugarTable("prod_task")]
public class ProdTask : EntityBase
{
    /// <summary>
    /// 产线 Id。
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 产线编号
    /// </summary>
    [NotNull]
    public string? LineCode { get; set; }

    /// <summary>
    /// 区域
    /// </summary>
    public string? Area { get; set; }

    /// <summary>
    /// 区域名称
    /// </summary>
    public string? AreaName { get; set; }

    /// <summary>
    /// 区域尾部工序
    /// </summary>
    public string? TailProcCode { get; set; }

    /// <summary>
    /// 班次 Id
    /// </summary>
    public long ShiftId { get; set; }

    /// <summary>
    /// 班次编号
    /// </summary>
    public string? ShiftCode { get; set; }

    /// <summary>
    /// 班次
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ShiftId))]
    public MdShift? Shift { get; set; }

    /// <summary>
    /// 任务数量
    /// </summary>
    public int Qty { get; set; }
}
